package com.ruoyi.project.purchase.service;

import java.util.List;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.domain.ResultBean;
import com.ruoyi.project.purchase.domain.RyQuality;
import com.ruoyi.project.purchase.domain.pojo.DepotDetailBean;
import com.ruoyi.project.purchase.domain.pojo.DepotHeadItem;
import com.ruoyi.project.warehouse.domain.RyDepotItem;

/**
 * 采购质检Service接口
 *
 * @author you
 * @date 2022-09-25
 */
public interface IRyQualityService
{
    /**
     * 查询采购质检
     *
     * @param id 采购质检主键
     * @return 采购质检
     */
    public RyQuality selectRyQualityById(Long id);

    /**
     * 查询采购质检列表
     *
     * @param ryQuality 采购质检
     * @return 采购质检集合
     */
    public List<RyQuality> selectRyQualityList(RyQuality ryQuality);

    /**
     * 根据订单id查询关联采购单
     * @param orderId
     * @return
     */
    public int selectCountByOrderId(Long orderId);


    /**
     * 新增采购质检
     *
     * @param ryQuality 采购质检
     * @return 结果
     */
    public int insertRyQuality(RyQuality ryQuality);

    /**
     * 根据主表修改单据子表信息
     */
    public AjaxResult editDepotDetail(DepotHeadItem depotHeadItem);

    /**
     * 新增采购质检信息
     */
    public AjaxResult addDepotHeadAndDetail(DepotHeadItem depotHeadItem);

    /**
     * 修改采购质检
     *
     * @param ryQuality 采购质检
     * @return 结果
     */
    public int updateRyQuality(RyQuality ryQuality);

    /**
     * 查询采购质检单据主表及子表信息
     *
     * @param id 单据主表主键
     * @return 单据主表及子表信息
     */
    public DepotHeadItem selectRyDepotDetailById(Long id);

    public List<RyDepotItem> selectOrderItemByDepotId(Long id);

    /**
     * 批量删除采购质检
     *
     * @param ids 需要删除的采购质检主键集合
     * @return 结果
     */
    public int deleteRyQualityByIds(Long[] ids);

    /**
     * 删除采购质检信息
     *
     * @param id 采购质检主键
     * @return 结果
     */
    public int deleteRyQualityById(Long id);
}
